-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add authn #1
Add authn #1
Conversation
|
||
// BasicAuth returns the username and password provided in the request's | ||
// Authorization header, if any. | ||
func (r Request) BasicAuth() (username string, password string, ok bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new, helper for basic auth that just delegates to the request.
|
||
// Request describes a single RPC invocation. | ||
type Request struct { | ||
request *http.Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice change! Also opens the door for us to expose cookies, which are annoyingly tied to http.Request
.
Add authn package. Based off of https://github.com/akshayjshah/connectauth.
Changes:
r.BasicAuth()
without the overhead on every request. Should be extensible down the line to add more helpers likeBearerAuth()
etc.TLS()
method to enable authFunc to check TLS settings